package com.wcx.create.singleton;

/**
 * 项目: design-pattern-githupdemo
 * <p>
 * 功能描述: 饿汉模式
 *
 * @author: WuChengXing
 * @create: 2021-01-11 23:04
 **/
public class HungryManSingleton {
    private static HungryManSingleton instance = new HungryManSingleton();

    private HungryManSingleton() {
    }

    public static HungryManSingleton getInstance() {
        return instance;
    }

    // 访问方式
//    Singleton instance = Singleton.getInstance();

}
